package com.sci.gen;

import java.util.List;

import javax.sql.DataSource;

import com.jfinal.plugin.activerecord.generator.BaseModelGenerator;
import com.jfinal.plugin.activerecord.generator.Generator;
import com.jfinal.plugin.activerecord.generator.TableMeta;

public class MyGenerator extends Generator {

	public MyGenerator(DataSource dataSource,
			BaseModelGenerator baseModelGenerator) {
		super(dataSource, baseModelGenerator);
	}

	/**
	 * 构造 Generator，生成 BaseModel、Model、MappingKit 三类文件，其中 MappingKit 输出目录与包名与 Model相同
	 * @param dataSource 数据源
	 * @param baseModelPackageName base model 包名
	 * @param baseModelOutputDir base mode 输出目录
	 * @param modelPackageName model 包名
	 * @param modelOutputDir model 输出目录
	 */
	public MyGenerator(DataSource dataSource, String baseModelPackageName, String baseModelOutputDir, String modelPackageName, String modelOutputDir) {
		super(dataSource, new BaseModelGenerator(baseModelPackageName, baseModelOutputDir), new MyModelGenerator(dataSource, modelPackageName, baseModelPackageName, modelOutputDir));
	}
	
}
